using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

/**
*@file       GSRole_EnterReciever.cs
*@brief      process message GSRole_Enter
*
*@author     graywind
*@version    1.0.0.1
*@data       2012/3/19
*/

//process GSRole_Enter
public class OnGSRole_Enter
{
    /// <summary>
/// process message
    /// </summary>
    /// <param name="op">message operator</param>
    /// <param name="session_id">session identifier</param>
    /// <param name="msg_buffer">message buffer</param>
    /// <param name="msg_bytes">buffer length</param>
    public static void OnMapping(IMessageOperator op, Int32 session_id, byte[] msg_buffer, UInt32 msg_bytes)
    {
        //TODO
		gameserver.RoleEnter role_enter = ProtoNet<gameserver.RoleEnter>.CreateFromBytes(msg_buffer, msg_bytes);
		int server_session = op.GetDBHandle();
		if(server_session != NetLib.INVALID_SESSION)
		{
			msgDBRole_Enter db_role_enter = new msgDBRole_Enter(server_session, role_enter);
		}
    }
}

//register callback
partial class MessageProcTypes<ProcType, MessageProc>
{
        [MessageProcType((int)GameServerTypes.MessageType.GSRole_Enter)]
        public static GameServerProcessor.GameServerTabFunc GSRole_EnterProc = new GameServerProcessor.GameServerTabFunc(OnGSRole_Enter.OnMapping);
}
